import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const Layout = () => import('../views/layout.vue')
const Index = () => import('../views/home/index.vue')
const Question = () => import('../views/question/index.vue')
const Video = () => import('../views/video/index.vue')
const Profile = () => import('../views/profile/index.vue')
const Login = () => import('../views/login/index.vue')
const User = () => import('../views/user/index.vue')
const Chat = () => ('../views/user/chat.vue')
const Search = () => ('../views/search/index.vue')
const Result = () => ('../views/search/result.vue')

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '/',
        // 首页
        component: Index,
        children:[

        ],
      },
      {
        path: '/question',
        // 问答
        component: Question
      },
      {
        path: '/video',
        component: Video
      },
      {
        path: '/user',
        // 个人中心
        component: Profile
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
